package model_zh_kernel

import (
	"fmt"

	"zhonghui/console/warehouse/modelx/model_common"
)

type ConsoleGroups struct {
	ID   uint   `gorm:"column:id" json:"id"`     // 暂无注释
	Name string `gorm:"column:name" json:"name"` // 组名

	Managers []ConsoleManager `gorm:"many2many:console_group_manager;joinForeignKey:group_id;joinReferences:manager_id;"`

	model_common.CommonCreated // 时间字段
}

func (ConsoleGroups) TableName() string {
	return fmt.Sprintf("%s.console_groups", DbName)
}
